package day10;

import java.io.*;
import java.util.Properties;

public class Properties02 {
    public static void main(String[] args) throws IOException {
        //使用Properties类来读取mysql.priperties文件
        //创建对象
        //System.out.println(new File("java高级/src/mysql.properties").getAbsolutePath());
        Properties properties = new Properties();

        //properties.load(new FileInputStream("java高级/src/mysql.properties"));
        properties.load(Properties02.class.getClassLoader().getResourceAsStream("mysql.properties"));

        System.out.println(properties);
        String v=properties.getProperty("telephone");
        System.out.println(v);
    }
}
